package com.hzlj.position.config.rest.wd.impl.traxBean;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;

public class TraxBeanDateParse {

    public static String parseDateTime(String dateTime) {
        if (ObjectUtil.isEmpty(dateTime)) {
            return null;
        }
        return DateUtil.formatDateTime(DateUtil.offsetHour(DateUtil.parse(dateTime), 8));
    }

    public static String parseDate(String date) {
        if (ObjectUtil.isEmpty(date)) {
            return null;
        }
        return DateUtil.formatDate(DateUtil.offsetHour(DateUtil.parseDate(date), 8));
    }
}
